<template>
  <div>
    <div class="title">
      <span class="title-span">周末推荐</span>
    </div>
    <ul>
      <li class="item border-bottom" v-for="item of list" :key="item.id">
        <div class="item-img-container">
          <img :src="item.imgUrl" alt="">
        </div>
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  name: 'HomeRecommend',
  props: {
    list: Array
  },
  data () {
    return {
    }
  }
}
</script>
<style lang="stylus" scoped>
  @import "~styles/mixins.styl"
  .title
    padding 0 .1rem
    img
      position relative
      top -0.1rem
      width .3rem
      height .3rem
    .title-span
      margin-left 0.05rem
      line-height .8rem
      background #eee
      margin-top .1rem
      text-indent .2rem
      font-size .32rem
  .item-img-container
    overflow hidden
    height 0
    padding-bottom 37.8%
    img
      width 100%
  .item-info
    padding .1rem
    .item-title
      font-size .32rem
      line-height .54rem
      ellipse()
    .item-desc
      line-height .4rem
      color #ccc
      ellipsis()
</style>
